//
//  CNShoppingGoods.m
//  BeeQuick_19
//
//  Created by w on 16/9/23.
//  Copyright © 2016年 CN Team. All rights reserved.
//

#import "CNShoppingGoods.h"

#pragma 实现商品数据类回调
@implementation GoodsData

+ (void)loadGoodsData:(CompleteBlock)complete {
    NSString *path = [[NSBundle mainBundle] pathForResource:@"首页新鲜热卖" ofType:nil];
    NSData *data = [NSData dataWithContentsOfFile:path];
    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
    GoodsData *goodsData = [GoodsData mj_objectWithKeyValues:json];
    complete(goodsData.data,nil);
}

+ (NSDictionary *)mj_objectClassInArray {
    return @{@"data":NSStringFromClass([CNShoppingGoods class])};
}
@end
#pragma 实现商品类
@implementation CNShoppingGoods

+ (NSDictionary *)mj_replacedKeyFromPropertyName {
    return @{@"gid" : @"id"};
}
@end
